package com.datang.litejvm.constant;

import com.datang.litejvm.print.Visitor;

public class ConstantStringInfo extends ConstantInfo {
    private int tag = ConstantInfo.CONSTANT_STRING_INFO;
    private int index;
    private String value = "String";
    public ConstantStringInfo(ConstantPool pool) {
        super(pool);
    }

    public int getTag() {
        return tag;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public  void accept(Visitor visitor){
        visitor.visit(this);
    }
}
